package svc

import (
	"api/internal/config"
	"github.com/zeromicro/go-zero/zrpc"
	"house_srv/housesrvclient"
)

type ServiceContext struct {
	Config   config.Config
	HouseSrv housesrvclient.Housesrv
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:   c,
		HouseSrv: housesrvclient.NewHousesrv(zrpc.MustNewClient(c.HouseSrv)),
	}
}
